#include <sys/ipc.h>
#include <sys/shm.h>
#include <stdio.h>
#include <sys/sem.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/msg.h>
#include <errno.h>
#include <string.h>
#include <ctype.h>
#include <time.h>

#define SHMSZ 1001
#define MAXLEN 256

struct my_msgbuf {
	long mtype;
	char msg[MAXLEN];
};

union semun {
	int val;
	struct semid_ds *buf;
	unsigned short * array;
} argument;

void server_exit(void);
void waitchildren(int signum);